]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
power-status: Mark number with percentage for translation
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 7 Sep 2011 12:25:02 +0000 (14:25 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 14 Sep 2011 13:43:21 +0000 (15:43 +0200)
Some locales expect the percentage sign before the number while
others use a different character, so mark it for translation.

https://bugzilla.gnome.org/show_bug.cgi?id=644097

js/ui/status/power.js

index baf0697eae3536a806dbdafd1b08e6ef478573a2..6e319e852575065013236916283f3597855f5a72 100644 (file)
@@ -118,7 +118,7 @@ Indicator.prototype = {
                         timestring = ngettext("%d minute remaining", "%d minutes remaining", minutes).format(minutes);
                     this._batteryItem.label.text = timestring;
                 }
-                this._primaryPercentage.text = Math.round(percentage) + '%';
+                this._primaryPercentage.text = C_("percent of battery remaining", "%d%%").format(Math.round(percentage));
                 this._batteryItem.actor.show();
             } else {
                 this._hasPrimary = false;
@@ -191,7 +191,7 @@ DeviceItem.prototype = {
         this._box.add_actor(this._label);
         this.addActor(this._box);
 
-        let percentLabel = new St.Label({ text: '%d%%'.format(Math.round(percentage)) });
+        let percentLabel = new St.Label({ text: C_("percent of battery remaining", "%d%%").format(Math.round(percentage)) });
         this.addActor(percentLabel, { align: St.Align.END });
     },